<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/jsp/comm_css_include.jsp"%>
<!doctype html>
<html>
<head>
</head>
<body class="gray-bg">

<input type="hidden" value="${uuid }" id="uuid" name="uuid"/>
<input type="hidden" value="${busiId }" id="busiId" name="busiId"/>
<div class="container creditbody">
		<div class="iboxtitle">
		 	<span><i class="glyphicon glyphicon-map-marker"></i>&nbsp;贷后业务>逾期风控>逾期数据调整</span>
         </div>
         <div class="buttonfixed">   
	         <button type="button" class="btn dpbtn_blue btnaplly" onclick="save();">保存提交</button>
	     </div>    
         <form class="form-horizontal" id="commentForm">
	         <div class="ibox-content ibox-con">
				<%@include file="/jsp/comm_yw_info_include.jsp"%>
				<div class="business-manwife">手动调整数据</div>
					<div class="padding-nono">
					    <table cellpadding="0" cellspacing="0" border="0" class="buyinfor-table">
							 <tr>
								<td align="right">
									<label class="control-label np">实际累计逾期期数：</label>
								</td>
								<td> 
									<input class="form-control" required="required" placeholder="逾期期数(必填)" type="number" id="overdueCountTotalReal" name="overdue_count_total_real"  />
								</td>	
							</tr>	
						</table>
					</div>	
	            </div>
				<div class="business-manwife">经办信息</div>
				<div class="padding-nono">
				    <table cellpadding="0" cellspacing="0" border="0" class="buyinfor-table">
						 <tr>
							<td align="right">
								<label class="control-label np">经办人：</label>
							</td>
							<td> 
								<input class="form-control" type="text" id="operater" name="" readonly="readonly" value="${current_user_key.uname}" />
							</td>	
							<td align="right">
								<label class="control-label np">经办时间：</label>
							</td>
							<td>
								<input id="operaterTime" name="operaterTime" required="required"  placeholder="经办时间(必填)" class="laydate-icon form-control" onclick="laydate()" />
							</td>
						</tr>	
					</table>
					
				</div>			
			</form>
	 	</div>
 	</div>
</div>	
	
 	<!-- layerDate plugin javascript -->
    <script type="text/javascript" src="${basePath}/js/plugins/layer/laydate/laydate.js"></script>
    
	<!-- public quote -->
    <%@include file="/jsp/comm_js_include.jsp"%>
	
	<!-- custom js -->
    
    <script type="text/javascript"></script>
    
    <script type="text/javascript">
    
    $(document).ready(function () {
        $("#commentForm").validate({
            rules: {
            	"overdue_count_total_real":{
            		zhengZS: true,
            	},
            },
            //重写showErrors
            showErrors: function (errorMap, errorList) {
                
                $.each(errorList, function (i, v) {
                    layer.tips(v.message, v.element, { time: 2000 });
                    return false;
                });  
            },
            /* 失去焦点时验证 */
            onfocusout: function(element) { $(element).valid(); },
            /*  键盘抬起不验证 */
            onkeyup:false,
        });
    });
    
    $("#overdueCountTotalReal").val($.getUrlData("overdueCountTotalReal"));
	    var save=function(){
	    	var data={};
	    	data.id=$.getUrlData("replaceId");
	    	data.busiId= $.getUrlData("busiId");
	    	data.cusId= $.getUrlData("cusId");
	    	data.overdueCountTotalReal=$("#overdueCountTotalReal").val();
	    	data.jbDate=$("#operaterTime").val();
// 	    	data.creatorName=$("#operater").val();
//         	data.creator="${current_user_key.id}";
			var validstatus = $("#commentForm").valid();
			if(validstatus){
		    	$.dpAjax({
		    		url:'${basePath}/DhOverdueListController/modify',
		    		data:data,
					success: function(datas){
		    			  if(datas.flag == "100100")
						  {
							  layer.msg('执行成功！', {icon: 6});
							  window.location.href="${basePath}/web/system/loanAfter/dhOverduechangeList.jsp";
							  return;
						  }
						  if(datas.flag == "100200")
		                  {
							  $.fn.showDatas({"datas":datas});
		                	  return;
		                  }
		            }
		    	});
			}	
	    }
	    
    </script>
</body>
</html>
